/**
 * 积分管理模块API
 * @desc 员工积分
 * @author 王东
 */
import request from '@/utils/request'
// 1.查询兑换商品
export function pointsExchangeGoodsList(query) {
  return request({
    url: '/wms/pointsExchangeGoods',
    method: 'get',
    params: query
  })
}
// 2.新增兑换商品
export function pointsExchangeGoodsSave(data) {
  return request({
    url: '/wms/pointsExchangeGoods',
    method: 'post',
    data
  })
}
// 3.兑换商品停用
export function pointsExchangeGoodsUnactive(arr) {
  return request({
    url: '/wms/pointsExchangeGoods/unactive',
    method: 'put',
    params: { codes: arr }
  })
}
// 4.兑换商品停用
export function pointsExchangeGoodsActive(arr) {
  return request({
    url: '/wms/pointsExchangeGoods/active',
    method: 'put',
    params: { codes: arr }
  })
}
// 5.更新兑换商品
export function pointsExchangeGoodsUpdate(data) {
  return request({
    url: '/wms/pointsExchangeGoods',
    method: 'put',
    data
  })
}
// 6.删除兑换商品
export function pointsExchangeGoodsDelete(code) {
  return request({
    url: `/wms/pointsExchangeGoods/${code}`,
    method: 'delete'
  })
}
